home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
8542
/
8542.xpi
/
chrome
/
lastpass.jar
/
content
/
chooseprofilecc.js
< prev
next >
Wrap
Text File
|
2010-02-14
|
2KB
|
7 lines
this.lpchooseprofilecc_window_load=function(I,H){I.title=LP.lpgs("Choose Profile and Credit Card");LP.sr(I,"profilecaption","label","Profile");LP.sr(I,"cccaption","label","Credit Card");LP.sr(I,"alwayschooseprofilecc","label","Always Choose Profile and Credit Card");var B=LP.lpprefsHasUserValue("profileffid")?LP.lpprefsGetIntPref("profileffid"):0;
var E=LP.lpprefsHasUserValue("ccffid")?LP.lpprefsGetIntPref("ccffid"):0;var F=false;var K=false;var G=0;var A=0;for(var D=0;D<lpformfills.length;D++){var C=lpformfills[D];if(C.profiletype==0){var J=I.createElement("radio");J.setAttribute("label",C.profilename);J.setAttribute("value",C.ffid);if(C.ffid==B){J.setAttribute("selected",true);
F=true}I.getElementById("profilegroup").appendChild(J);G++}if(C.ccnum!=""){var J=I.createElement("radio");J.setAttribute("label",C.profilename);J.setAttribute("value",C.ffid);if(C.ffid==E){J.setAttribute("selected",true);K=true}I.getElementById("ccgroup").appendChild(J);A++}}if(G<5){I.getElementById("profilebox").setAttribute("height",G*25)
}if(!F){I.getElementById("profilegroup").childNodes.item(0).setAttribute("selected",true)}if(A<5){I.getElementById("ccbox").setAttribute("height",A*25)}if(!K){I.getElementById("ccgroup").childNodes.item(0).setAttribute("selected",true)}if(LP.lpprefsHasUserValue("alwayschooseprofilecc")&&LP.lpprefsGetBoolPref("alwayschooseprofilecc")){I.getElementById("alwayschooseprofilecc").setAttribute("checked",true)
}};this.lpchooseprofilecc_accept_click=function(D,B){var C=D.getElementById("profilegroup").selectedItem.value;var A=D.getElementById("ccgroup").selectedItem.value;LP.lpprefsSetIntPref("profileffid",C);LP.lpprefsSetIntPref("ccffid",A);LP.lpprefsSetBoolPref("alwayschooseprofilecc",D.getElementById("alwayschooseprofilecc").checked);
LP.flush_prefs();LP.lp_fillFormsHelper(C,false,A);return true};this.lpchooseprofilecc_cancel_click=function(){return true};